﻿namespace Ymatou.User.Dto.Auth
{
    using System;
    using System.ComponentModel;

    /// <summary>
    /// 登录响应代码
    /// </summary>
    public enum LoginResponseCode
    {
        /// <summary>
        /// 用户ID或密码错误
        /// </summary>
        [Description("用户ID或密码错误")] LoingIdOrPasError = 0,

        /// <summary>
        /// 登录超过限制
        /// </summary>
        [Description("登录超过限制")] Limit = 1,

        /// <summary>
        /// 成功
        /// </summary>
        [Description("登录成功")] OK = 2,

        /// <summary>
        /// token无效
        /// </summary>
        [Description(" token无效")] TokenInvalid = 3,

        /// <summary>
        /// 系统内部错误
        /// </summary>
        [Description("调用认证系统API错误")] SystemInnerError = 4,

        /// <summary>
        /// 用户未找到
        /// </summary>
        [Description("用户未找到")] UserNotFind = 5,

        /// <summary>
        /// 用户被锁定
        /// </summary>
        [Description("用户凭据被锁定")] UserLocked = 6,

        /// <summary>
        ///用户被锁定 
        /// </summary>
        [Description("签名错误")] SignError = 7,

        /// <summary>
        /// token过期
        /// </summary>
        [Description("token过期")] TokenExpired = 8,
        [Description("黑名单用户")] BlackListUser = 10,
        [Description("需要执行身份认证")] NeedIdentityVerify = 20,
        [Description("请求参数错误")] RequestParameterError = 50,


        /// <summary>
        /// 非法的登录名, 登录名不能为空
        /// </summary>
        [Description("登录名不能为空")] NullLoingId = 101,

        /// <summary>
        /// 非法的登录名
        /// </summary>
        [Description("非法的登录名")] InvalidLoingId = 102,


    }

    public enum UserSource
    {
        /// <summary>
        /// 来自码头主站注册
        /// </summary>      
        MainSite = 0,

        /// <summary>
        /// 来自手机APP注册
        /// </summary>       
        App = 1,

        /// <summary>
        /// 来自支付宝账号注册
        /// </summary>      
        Wap = 2,

        /// <summary>
        /// 来自支付宝账号注册
        /// </summary>
        [Description("来自支付宝账号注册")]
        [Obsolete("不要使用，请设置或获取 ChannelSource 渠道来源值")]
        Alipay = 3,

        /// <summary>
        /// 来自QQ注册
        /// </summary>
        [Description("来自QQ注册")]
        [Obsolete("不要使用，请设置或获取 ChannelSource 渠道来源值")]
        QQ = 4,

        /// <summary>
        /// 来自新浪微博注册
        /// </summary>
        [Description("来自新浪微博注册")]
        [Obsolete("不要使用，请设置或获取 ChannelSource 渠道来源值")]
        Weibo = 5,
        /// <summary>
        /// 码头APP
        /// </summary>
        MatouApp = 6,
        /// <summary>
        /// 商家后台
        /// </summary>
        SellerSite = 7
    }
}
